﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TaskLib
{
    [Serializable]
    public class Task
    {
        public const long InvalidId = -1;

        private readonly long id;
        public long ID { get { return this.id; } }

        private string description;
        public string Description 
        { 
            get { return description; }
            set { this.description = value; }
        }

        private DateTime scheduled;
        public DateTime Scheduled 
        { 
            get { return scheduled; }
            set { this.scheduled = value; }
        }

        private DateTime completion;
        public DateTime Completion
        {
            get { return completion; }
            set { this.completion = value; }
        }

        private bool completed;
        public bool Completed
        {
            get { return completed; }
            set { completed = value; }
        }

        private string comment;
        public string Comment 
        { 
            get { return comment; }
            set { this.comment = value; }
        }

        internal Task()
        {
        }

        internal Task(long id, string description, DateTime scheduled, string comment)
        {
            this.id = id;
            this.description = description;
            this.scheduled = scheduled;
            this.comment = comment;

            this.completion = DateTime.MinValue;
            this.completed = false;
        }

        //internal Task(long id)
        //{
        //    this.id = id;
          
        //    this.completed = DateTime.MinValue;
        //}
    }
}
